import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'microcosm_log_method_channel.dart';

abstract class MicrocosmLogPlatform extends PlatformInterface {
  /// Constructs a MicrocosmLogPlatform.
  MicrocosmLogPlatform() : super(token: _token);

  static final Object _token = Object();

  static MicrocosmLogPlatform _instance = MethodChannelMicrocosmLog(null);

  /// The default instance of [MicrocosmLogPlatform] to use.
  ///
  /// Defaults to [MethodChannelMicrocosmLog].
  static MicrocosmLogPlatform get instance => _instance;
  
  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [MicrocosmLogPlatform] when
  /// they register themselves.
  static set instance(MicrocosmLogPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }
}
